/**
 *  Copyright 2011 Marco Berri - marcoberri@gmail.com
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and limitations under the License.
 **/
package com.conf;

/**
 *
 * @author Marco Berri marcoberri@gmail.com
 */
public class Log {



    private String filename = "mblog";
    private String path = "/WEB-INF/log/";
    private String rolling = "daily";
    private boolean debug = false;
    private boolean fatal_mail = false;


    /**
     * ramo di log
     */
    public static final String TAG_XML_LOG = "log";
    /**
     * nome del file
     */
    public static final String TAG_XML_LOG_FILENAME = "filename";
    /**
     * path su disco
     */
    public static final String TAG_XML_LOG_PATH = "path";
    /**
     * tipo di rotazione dei log
     */
    public static final String TAG_XML_LOG_ROLLING = "rolling";
    /**
     *  attiva la visualizzazione del debug
     */
    public static final String TAG_XML_LOG_DEBUG = "debug";

    /**
     *  attiva le mail su fatal
     */
    public static final String TAG_XML_LOG_FATAL_MAIL = "fatal_mail";


    /**
     * @return the filename
     */
    public String getFilename() {
        return filename;
    }

    /**
     * @param filename the filename to set
     */
    public void setFilename(String filename) {
        this.filename = filename;
    }

    /**
     * @return the path
     */
    public String getPath() {
        return path;
    }

    /**
     * @param path the path to set
     */
    public void setPath(String path) {
        this.path = path;
    }

    /**
     * @return the rolling
     */
    public String getRolling() {
        return rolling;
    }

    /**
     * @param rolling the rolling to set
     */
    public void setRolling(String rolling) {
        this.rolling = rolling;
    }

    /**
     * @return the debug
     */
    public boolean isDebug() {
        return debug;
    }

    /**
     * @param debug the debug to set
     */
    public void setDebug(boolean debug) {
        this.debug = debug;
    }

    /**
     * @return the fatal_mail
     */
    public boolean isFatal_mail() {
        return fatal_mail;
    }

    /**
     * @param fatal_mail the fatal_mail to set
     */
    public void setFatal_mail(boolean fatal_mail) {
        this.fatal_mail = fatal_mail;
    }

    /**
     *
     * @return
     */
    @Override
    public String toString() {

        return "filename: " + this.getFilename() + " - "
                + "path: " + this.getPath() + " - "
                + "rolling: " + this.getRolling() + " - "
                + "debug: " + this.isDebug() + " - "
                + "fatal_mail: " + this.isFatal_mail();
    }
}
